Expander: Don’t set event_window over whole widget
authorDaniel Boles <dboles@src.gnome.org>
Tue, 29 Aug 2017 10:24:19 +0000 (11:24 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Tue, 29 Aug 2017 17:47:33 +0000 (18:47 +0100)
commit18a6c5c4c68bd4eec99a4e0659b769f0b3ad42e0
tree90de1afb39b849e728e79075b317a3216af3fb07
parenta827e9222627b0462ae4c6bd063bf922faf4277a
Expander: Don’t set event_window over whole widget

realize() gave the event_window the allocation of the whole widget. This
was wrong; it should be that of the title_gadget, as in size_allocate().

This broke expanders in which :expanded is TRUE before showing: Input
over the entire widget was sent to the title, making the child unable to
receive it. Clicking the child unexpectedly collapsed it. Once expanded
again, things fixed themselves as size_allocate() fixed the event_window
alloc. So, queuing a reallocate or resize after show() was a workaround.

Fix by giving event_window the allocation of the title_gadget, to match
what size_allocate() does. That is symmetrical and just plain correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774134
gtk/gtkexpander.c